From bf68a296f84fe053be3320b9f2fa3e75ee9d4398 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Wed, 22 Nov 2006 09:12:49 +0000 Subject: [PATCH] g_filename_from_uri() might fail; catch the failure and fall back to the 2006-11-21 Emmanuele Bassi * gtk/gtkrecentmanager.c: (get_uri_shortname_for_display): g_filename_from_uri() might fail; catch the failure and fall back to the non-local URI case. (#363437) --- ChangeLog | 7 +++++++ gtk/gtkrecentmanager.c | 5 +++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0283bd7a72..a3d9241c4c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2006-11-21 Emmanuele Bassi + + * gtk/gtkrecentmanager.c: + (get_uri_shortname_for_display): g_filename_from_uri() might + fail; catch the failure and fall back to the non-local URI + case. (#363437) + 2006-11-19 Mark McLoughlin Fixes bug #376502 - multi-screen support for GtkStatusIcon diff --git a/gtk/gtkrecentmanager.c b/gtk/gtkrecentmanager.c index 68ac0de538..d99aefd38b 100644 --- a/gtk/gtkrecentmanager.c +++ b/gtk/gtkrecentmanager.c @@ -2225,7 +2225,7 @@ get_uri_shortname_for_display (const gchar *uri) local_file = g_filename_from_uri (uri, NULL, NULL); - if (local_file != NULL) + if (local_file) { name = g_filename_display_basename (local_file); validated = TRUE; @@ -2233,7 +2233,8 @@ get_uri_shortname_for_display (const gchar *uri) g_free (local_file); } - else + + if (!name) { gchar *method; gchar *local_file; -- 2.30.2